package interceptor;

import java.io.Serializable;

import org.hibernate.EmptyInterceptor;
import org.hibernate.type.Type;

public class ClasseNSA extends EmptyInterceptor{

	private static final long serialVersionUID = 1L;
	
	@Override
	public boolean onLoad(Object entity, Serializable id, Object[] state,
			String[] propertyNames, Type[] types) {
		System.out.println("Carregando: " + entity.getClass().getCanonicalName());
		System.out.println("Buscando: "+id);
		for(int i=0; i<state.length;i++){
			System.out.print("Propriedade: "+propertyNames[i]);
			System.out.println(" Estado: " + state[i]);
			
		}
				
		return super.onLoad(entity, id, state, propertyNames, types);
	}

}
